<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<title>Constructor</title>
<head>
	<script type="text/javascript">
		
Object.extend = function(s,d){
	var p;
	for(p in s){
		d[p]=s[p];	
	};
	return d;
};

function compono(){}
compono.prototype = {
	test:function(){
		alert(this)
	},
	trace:function(){
		alert("compono")
	}
}

compono.Class = function(Base){
	var _class = Base.constructor!==Object ? Base.constructor : function(){};
		_class.prototype = new compono();
		Object.extend(Base,_class.prototype);
		_class.prototype.constructor = _class;
		return _class;
}
 

var Window = new compono.Class({
	trace:function(){
		alert("window")
		alert(this.test);
	}
})

var w = new Window();
console.log(w, w.constructor)
	w.trace()

	
	</script>
</head>
<body>
</body>
</html>